<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>User table</title>
    </h:head>
    <h:body>
        <h:form>
        <p:dataTable paginator="true">
            <p:column headerText="#{bundle.user_id}" >
                <h:outputText value="#{usersListController.ids}"/>
            </p:column>
            <p:column headerText="#{bundle.name}" >
                <h:outputText value="#{usersListController.names}"/>
            </p:column>
            <p:column headerText="#{bundle.surname}">
                <h:outputText value="#{usersListController.surnames}"/> 
            </p:column>
            <p:column headerText="#{bundle.role}">
                <h:outputText value="#{usersListController.roles}"/>
            </p:column>
            <p:column headerText="#{bundle.email}">
                <h:outputText value="#{usersListController.emails}"/>
            </p:column>
            <p:column headerText="#{bundle.phone}"/>
            <p:column headerText="#{bundle.delete_label}">
                <h:commandButton id = "deleteButton" 
                                 value="#{usersListController.deleteUser()}"/>
            </p:column>
        </p:dataTable>
        </h:form>
    </h:body>
</html>

